package org.zfes.snowier.cloud.zbss.metting.router.service.tenant;

import java.util.Map;
import java.util.Optional;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.zfes.snowier.core.data.DataSet;
import org.zfes.snowier.web.controller.BaseController;
import org.zfes.snowier.cloud.zbss.metting.biz.model.MettingsMsgReply;
import org.zfes.snowier.cloud.zbss.metting.biz.service.IMettingsMsgReplyService;
@Controller("org.zfes.snowier.cloud.zbss.metting.router.service.tenant.MettingsMsgReplyController")  
@RequestMapping("/met/service/tenant/mettingsMsgReply")
public class MettingsMsgReplyController extends BaseController {

	
	@Autowired
	private IMettingsMsgReplyService mettingsMsgReplyService;
	
    @RequestMapping(value="/loadMettingsMsgReplyDataSet", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public @ResponseBody  Object loadMettingsMsgReplyDataSet(@RequestParam Map<String,Object> params){
	    DataSet dataSet=  mettingsMsgReplyService.loadMettingsMsgReplyDataSet(params);
	    return ajaxQuery("dataSet", dataSet);
    }
	
    @RequestMapping(value="/createMettingsMsgReply", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public  @ResponseBody Object createMettingsMsgReply(MettingsMsgReply mettingsMsgReply){
		mettingsMsgReplyService.createMettingsMsgReply(mettingsMsgReply);
    	return ajaxDoneSuccess("数据操作成功 ");
    }
	
    @RequestMapping(value="/loadMettingsMsgReply", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public @ResponseBody  Object loadMettingsMsgReply(Long id){
		Optional<MettingsMsgReply> ops = mettingsMsgReplyService.loadMettingsMsgReplyById(id);
		return ajaxQuery("mettingsMsgReply",ops);
    }
	
	
    @RequestMapping(value="/deleteMettingsMsgReply", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public @ResponseBody  Object deleteMettingsMsgReply(Long id){
		mettingsMsgReplyService.deleteMettingsMsgReply(id);
		return ajaxDoneSuccess("数据操作成功 ");
    }

}